
#ifndef WIDGETPANEL_H
#define WIDGETPANEL_H

#include <BLineEdit>
#include <BSpinBox>
#include <BGroupBox>
#include <BCheckBox>
#include <BComboBox>

#include "StyleSheetDialog.h"

class WidgetPanel : public BGroupBox
{
	BOBJECT(WidgetPanel);
public:
	WidgetPanel(BWidget* parent = 0);
	~WidgetPanel();

protected:
	Policy policyFromMenu(BMenu* menu, BString& text);

protected:
	void slotAssetChanged();
	void slotWidgetMoved(BObject* object, const BValue& value);
	void slotWidgetResized(BObject* object, const BValue& value);
	void slotWidgetTitleChanged(BObject* object, const BValue& value);

	void slotPosEditFinished();
	void slotSizeEditFinished();

	void slotStyleSheetButtonToggled(BObject* object, const BValue& value);
	void slotStyleSheetDialogFinished(BObject* object, const BValue& value);
	void slotStyleSheetDialogHide(BObject* object, const BValue& value);

private:
	BWidget*		_widget;

	BLineEdit*		_titleEdit;
	BCheckBox*		_framelessCheckBox;
	BSpinBox*		_posXSpinBox;
	BSpinBox*		_posYSpinBox;
	BSpinBox*		_widthSpinBox;
	BSpinBox*		_heightSpinBox;
	BButton*		_styleSheetButton;

	StyleSheetDialog*	_styleSheetDialog;
};

#endif
